﻿<Window x:Class="XSemmel.Helpers.BulkWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Height="260" Width="600" MinWidth="400" MinHeight="250">
    
    <TabControl x:Name="_tabCtrl" x:FieldModifier="private" Margin="5">
        <TabItem Header="Search for">
            <DockPanel>
                <StackPanel DockPanel.Dock="Bottom">
                    <Button 
                        x:Name="_btnSearch" x:FieldModifier="private"
                        Click="btnSearch_Click">
                        Start
                    </Button>
                </StackPanel>
                
                <ContentPresenter x:Name="_input" x:FieldModifier="private"
                                 DockPanel.Dock="Top" />

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="170"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="20"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Grid.Column="0" Grid.Row="0" Margin="0 5 0 0">
                        Folder of files to process:
                    </TextBlock>
                    <TextBox Grid.Column="1" Grid.Row="0" x:Name="_edtFolderReferences" x:FieldModifier="private" Margin="0 5 0 0"/>
                    <Button Grid.Column="2" Grid.Row="0" Click="btnSelectPath_Click" Margin="0 5 0 0">...</Button>
                    <TextBlock Grid.Column="0" Grid.Row="1" Margin="0 5 0 0">
                        Pattern of files to process:
                    </TextBlock>
                    <TextBox Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" x:Name="_edtPatternReferences" x:FieldModifier="private" Margin="0 5 0 0">
                        *.xml;*.xaml
                    </TextBox>
                    <CheckBox Grid.Column="1" Grid.Row="2" x:Name="_chkReferencesRecursive" IsChecked="True" x:FieldModifier="private" Margin="0 5 0 0">
                        Recursive
                    </CheckBox>
                </Grid>
            </DockPanel>
        </TabItem>
        
        <TabItem
            x:Name="_tabResult" x:FieldModifier="private"
            Header="Result" IsEnabled="False">
            
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="80" MinHeight="10" />
                    <RowDefinition Height="*" MinHeight="10" />
                </Grid.RowDefinitions>

                <TextBox 
                    x:Name="_edtProgress" x:FieldModifier="private" 
                    Grid.Row="0"
                    IsReadOnly="True"  
                    HorizontalScrollBarVisibility="Auto"
                    VerticalScrollBarVisibility="Auto"
                />
                <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="4" />

                <TextBox
                    x:Name="_edtResult" x:FieldModifier="private" Grid.Row="1"
                    IsReadOnly="True"
                    HorizontalScrollBarVisibility="Auto"
                    VerticalScrollBarVisibility="Auto">
                    <TextBox.ContextMenu>
                        <ContextMenu>
                            <MenuItem Header="Copy" Click="btnCopy_Click"/>
                            <MenuItem Header="Save" Click="btnSave_Click"/>
                            <MenuItem Header="Open in new Xsemmel" Click="btnOpenInNewXsemmel_Click"/>
                        </ContextMenu>
                    </TextBox.ContextMenu>
                </TextBox>
            </Grid>
        </TabItem>
    </TabControl>
    
    
</Window>
